package cz.proks.schoolpupilbook.gwt.widget.form.course;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Widget;

import cz.proks.schoolpupilbook.gwt.widget.common.CourseForm;
import cz.proks.schoolpupilbook.gwt.widget.common.LoggedUserPanel;

public class CourseWidget extends Composite {

	private static CourseWidgetUiBinder uiBinder = GWT.create(CourseWidgetUiBinder.class);

	interface CourseWidgetUiBinder extends UiBinder<Widget, CourseWidget> {
	}
	
	@UiField LoggedUserPanel loggedUserPanel;
	@UiField HTML text;
	@UiField CourseForm courseForm;

	public CourseWidget() {
		initWidget(uiBinder.createAndBindUi(this));
		setText("You are editing course");
	}
	
	public LoggedUserPanel getLoggedUserPanel() {
		return loggedUserPanel;
	}


	public CourseForm getCourseForm() {
		return courseForm;
	}
	
	public void setText(String text) {
		this.text.setHTML(text);
	}

}
